package Class.Basis.test.GirlFriend;

public class GirlFriend {
    private String name;
    private int age;

    public boolean setAge(int age) {
        if (age >= 18 && age <= 50) {
            this.age = age;
            return false;
        } else {
            System.out.println("非法数据");
            return true;
        }
    }
    public int returnAge(){
        return age;
    }

    public void greet() {
        System.out.println("hello!");
    }
}
